const tbody = document.querySelector("tbody");
const button = document.getElementById("buttonclick");
    button.addEventListener('click',function (){
    axios({
        method: 'get',
        url: 'http://localhost/fileweb',
        responseType: 'json',
    }).then(function (resopnse) {
        tbody.innerHTML="";
        var data = resopnse.data;
        for (let i = 0; i < data.length; i++) {
            var tr = $("<tr></tr>>");
            var parse = JSON.parse(data[i]);
            for (let key in parse) {
                var td = "<td>" + parse[key] + "</td>";
                tr.append(td);
            }
            $("tbody").append(tr);
        }
    }).catch(function (error) {
        console.log(error)
    });
})

